using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class TableLocation : System.Web.UI.UserControl
{
    private bool _isActive = false;

    public bool IsActive
    {
        get
        {
            return _isActive;
        }
        set
        {
            _isActive = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (_isActive)
            {
                hypTable.CssClass = "activeTabLink";
            }
            else
            {
                hypTable.CssClass = "tabLink";
            }

            string databaseName = Request.QueryString["database"];
            string tableName = Request.QueryString["table"];
            string schema = Request.QueryString["schema"];


            hypTable.NavigateUrl = string.Format("~/Administration/TableProperties.aspx?database={0}&table={1}&schema={2}",
                HttpUtility.UrlEncode(databaseName),
                HttpUtility.UrlEncode(tableName),
                HttpUtility.UrlEncode(schema));
            hypTable.Text = HttpUtility.HtmlEncode(schema + "." + tableName);

        }
    }
}
